home *** CD-ROM | disk | FTP | other *** search
- TUTORIALS FOR POWERBASE
- =======================
-
- Powerbase is an extremely powerful program. Despite the fact that it is
- actually very easy to use its complexity and many features can make it
- difficult for the new user to get started. This booklet uses some ready made
- example databases supplied on the distribution disc to help familiarise you
- with the main functions of the program.
-
- It is made up of two sections. The first is a Quick Tutorial aimed at
- inexperienced users who may not have used a database before. The Main
- Tutorial is meant for people who, although new to Powerbase, have some
- familiarity with other databases. If you do fall into this category you
- should skip the Quick Tutorial and move straight on to the Main Tutorial.
-
- QUICK TUTORIAL
- ==============
- This tutorial is intended to acquaint the new user as painlessly as possible
- with the most commonly-used facilities of Powerbase. It does not explain how
- to create a database from scratch (see Chapter 4 − Creating a New Database −
- in the Manual), nor does it delve into the many advanced features, but it
- does explain how to:−
-
- (a) Start up Powerbase and open an existing database.
- (b) Browse through the database and search for individual records.
- (c) Add new records and alter or delete existing ones.
- (d) Query the database to create simple reports.
- (e) Close the database.
-
- The supplied sample database Friends is used to illustrate most of these
- activities. If you have a hard disc you should copy Friends and Powerbase
- itself onto it before proceeding further. It is possible to use Powerbase
- from floppy discs only but some operations, such as printing lists, will be
- quite slow. Unless memory is very tight users of floppy discs are
- recommended to allocate at least 32K to the RAM disc and copy Friends onto
- it. Everything will then run much faster. Powerbase can provide
- context-sensitive help via Acorn’s !Help application and you are advised to
- load this, resizing the help window and placing it at the top right of the
- screen. Further help can be had by choosing the Help entry which will be
- found on Powerbase’s main menu and also on the icon-bar menu.
-
- 1 Starting Powerbase
- =====================
- Double-click on the Powerbase icon. After a few seconds it will appear on
- the icon-bar with the words “No data” beneath it to show that no database is
- open. Dragging the Friends icon onto the Powerbase icon on the icon-bar will
- open Friends for use and the words “No data” will be replaced by the name of
- the database.
-
- Two windows will open. One is the record window and displays the first
- record in the database, the one for Badgery Peter. The other is the keypad
- which allows you to control the browsing, searching and editing functions of
- Powerbase. The keypad is rather large and obscures quite a big area of the
- record window. The most-used buttons, however, are on the top two rows and
- clicking the “toggle size” icon (the small square at the right-hand end of
- the keypad’s title bar) will reduce the keypad to these two rows only. A
- second click restores it to full size.
-
- 2 Browsing and Searching
- =========================
- Now that you have a database running we will find out how to move from
- record to record and how to access any specific record by using a small
- group of letters called the key of the record. All the mouse clicks
- referred to are made with the SELECT (left) button. If the chosen keypad
- action has an obvious opposite then you will find that using the ADJUST
- (right) mouse button brings about that effect. e.g. While SELECT on the top
- left keypad button takes you to the start of the file, ADJUST on the same
- keypad button takes you to the end.
-
- 2.1 Browsing through the Records
- --------------------------------
- The top row of buttons on the keypad allows you to browse through the file.
- If you have !Help running, as previously suggested, it will tell you what
- each button does. Once you get the general idea you will find the symbols on
- the buttons logical and self-explanatory. The most commonly used ones act as
- follows:−
-
- (a) The arrows at the ends of the row take you to the first and last
- records. You are at the first record now, so click with SELECT on
- the top-right button and you will see the record for Turnip Charles.
- The leftmost button takes you back to the start again.
-
- (b) Movement through the file one record at a time is achieved using the
- single arrow keys next door to the ones you have just used. Try them
- out, noting the way records come up in alphabetical, or reverse
- alphabetical, order.
-
- (c) The keys with double arrows let you make longer jumps through a
- file. The number of records skipped is shown in the writable icon
- between them and has a default value of 10. As there are only 10
- records in Friends these keys will have the same effect as the
- “first” and “last” keys, unless you make the interval smaller. Click
- in the icon, delete the 10 and enter 5 or 2, then try the
- double-arrow keys again.
-
- 2.2 Searching for a record
- --------------------------
- The fifth button on the second row of the keypad shows a question mark
- followed by a “record card” icon. We will call it the Search button. When
- clicked with SELECT a small window opens on the right-hand side of the
- keypad. This is the Search window and contains a writable icon in which to
- enter the key of the record you wish to display. In this database keys are
- made up from the first 4 letters of the surname plus the initial so, if you
- wanted to call up the record for Bloggs Fred you would need to enter BLOGF.
- Do so then click on Find (or type the Return key on the keyboard) and the
- record will be displayed. Note that the key is shown in the window heading.
-
- If you enter the key of a non-existent record Powerbase displays the record
- which most nearly matches the key, but flashes the key field to warn you
- that what is being displayed is not what you asked for.
-
- 3 Editing the Database
- =======================
- This part of the tutorial involves changes to the data. Make a working copy
- of the disc and put the original in a safe place. If you are using a copy of
- Friends on the RAM disc then the floppy disc won’t be altered, but it’s
- still not a good idea to work with the original disc.
-
- 3.1 Modifying records
- ---------------------
- Point the mouse at any field and click SELECT. The red text caret will
- appear in the field. The contents of the field may now be edited with the
- aid of the keystrokes which are standard for all RISC OS writable icons.
- i.e.
-
- Ctrl U clears the field.
- Delete removes the character to the left of the caret.
- Copy removes the character to the right of the caret.
- Shift/Copy deletes the word to the right of the caret.
- Ctrl/Copy deletes everything from the caret to the end of the line.
- ⇦ and ⇨ move the caret left/right by one character.
- Shift ⇦ and Shift ⇨ move the caret left/right by one word.
- Ctrl ⇦ and Ctrl ⇨ move the caret to start and end of the field.
-
- Having modified one or more fields you may be wondering what you have to do
- to make Powerbase save the modified record so that the changes won’t be
- lost. You don’t need to do anything! Powerbase will ensure that your changes
- are saved when you display a different record or close the database.
-
- 3.2 Recovering data after a mistake
- -----------------------------------
- You may edit the wrong field by mistake and want to restore the previous
- contents. Call up Bloggs Fred’s record and change the address from “12
- Woodland Road Exeter” to “12 Woodville Road Exmouth”. Now click MENU over
- the first line of the address. The second entry on the main menu (Field)
- contains a short group of letters called the tag of the field, in this case
- ADD1. Follow the right-pointing arrow to the Field sub-menu and choose the
- last entry; Undo changes. The contents of the field will revert to “12
- Woodland Road”. Notice that only the first line of the address is affected;
- the town is still “Exmouth”. If you want to restore that field as well
- click MENU over it and follow the procedure just described.
-
- There might be occasions when you make a hopeless mess of a record and want
- to discard all the changes and revert to what you started with. You could,
- of course, “undo” each field separately as we just did for the street
- address and town but there’s a quicker way. Look near the bottom of the
- main menu, (just above Help) and you will see that here too is an Undo
- changes option. Choosing this undoes all the alterations you have made.
-
- It is important to realise that these facilities depend on the fact that
- Powerbase holds the currently-displayed record in memory and will therefore
- only work if the altered record has remained on display from the time you
- started changing it up to the point where you decided to “undo”. If you have
- looked at another record or clicked on Force update in the meantime then the
- changes will have been written to the disc and thus become “permanent”.
-
- 3.3 Adding and deleting records
- -------------------------------
- To add a new record we use the Add record button which looks like a plus
- sign and an index card. Clicking on this offers a blank record into which
- you can type new data. You don’t have to complete all the fields, in fact
- the only field into which you must type something is the NAME field. This is
- the key field; the one from which the key, mentioned earlier, is derived. If
- you leave the key field blank then nothing will be written to the database.
-
- Type the name “Bodmin George”, then go to the beginning of the file and step
- through it record by record. You will find that your new record has been
- inserted in the correct place, i.e. the sequence goes: Badgery, Bloggs,
- Bodmin, Cavendish.
-
- Now try deleting the record you’ve just added. There is a “dustbin” button
- which will do exactly that, but don’t use it just yet. Make sure that the
- unwanted record is on the screen and click the button to the right of the
- dustbin. You will now find that Bodmin’s record has vanished; the names now
- run straight from Bloggs to Cavendish, just as they did before you added
- Bodmin.
-
- This looks a bit too easy. Suppose you clicked the keypad button by mistake
- and deleted an important record? No problem; what you have just done has
- been made easy because it’s far less drastic than it looks. The record
- hasn’t really been deleted at all. Click the button above the one you used
- for “deleting”. This shows a green right-pointing arrow and a card index
- icon. “Bodmin” will reappear. You will soon find, however, that it appears
- to be the only record in the file! Don’t worry; nothing has been lost. A
- Powerbase database is treated as six separate subfiles numbered 0−5. When
- you first open the database you are looking at Subfile 0 and the heading of
- the record window shows this. If you look at the heading now you will see
- that it has changed to Subfile 1.
-
- The buttons on either side of the bin carry pictures which suggest their
- true functions. They do not delete records; they merely move records from
- one subfile to another. The right button moves the displayed record to the
- next subfile in sequence. Thus, in the above case the “Bodmin” record has
- been moved from subfile 0 to subfile 1. A record in subfile 1 would be moved
- to subfile 2 and so on. When it gets to 5 the next click moves it into
- subfile 0 where it was originally. As you may have guessed, the left button
- moves records in the opposite direction, i.e. from subfile 1 to 0 or from
- subfile 0 to 5.
-
- If you do want to lose a record for good you consign it to the dustbin. As
- this button’s action is more drastic than that of the other two you are
- given a chance to change your mind. A window headed Powerbase: please
- confirm: will appear displaying the question Delete record permanently?
- Clicking OK causes the record to be deleted, Cancel removes the warning
- window from the screen leaving the record untouched.
-
- 4 Printing Lists
- =================
- Before Powerbase can produce a list it must be told:−
-
- • which fields should appear on the list
- • which records should appear on the list
-
- 4.1 Making the field selection
- ------------------------------
- Specifying the fields you want is extremely easy. To include a field point
- at it and click with ADJUST. The selected field will then appear with its
- foreground and background colours reversed. If you change your mind you can
- de-select it by clicking on it again with ADJUST. The order in which you
- select the fields is the order in which they will appear in the printed
- list. Take care with this as there is nothing on the screen to indicate what
- order the fields will be in. Field selections may be saved (using Save
- selection from the Print submenu) and reloaded for future use. For now
- select the name and the first 3 fields of the address.
-
- 4.2 Choosing which records to print
- -----------------------------------
- Specifying which records to print is somewhat more complicated, although
- efforts have been made to render it as simple as possible. With the mouse
- pointer in the record window click MENU. This displays the main Powerbase
- menu from which you should choose Print. A small window appears in which you
- can specify the criteria which must be met by records for inclusion in the
- list. If you just click over the Print button (or type Return) without
- entering anything, you will obtain a list of the whole database (or, more
- accurately, of the the whole of the current subfile). Try this first.
-
- When the search is complete the list will be displayed in a window. If you
- point to a record in the list and double-click with SELECT Powerbase will
- display the chosen record in the main record window. Note that the caret is
- placed in the field you were pointing to on the list. This is very useful if
- you spot errors in the data whilst examining a list. A double click on the
- offending item offers the record with the caret correctly positioned for
- editing.
-
- Most queries involve printing only some of the records, not the whole
- database. To target a particular group of records we need to enter a search
- formula which will distinguish the records we want to print from all the
- rest of the records. Search formulae can be quite complex and a more
- detailed treatment is given in the Manual. Only a few simple examples are
- shown here. Enter the following and then click Print:−
-
- ADD2=Exeter
-
- The report window appears showing just one record: the one for “Bloggs
- Fred”. ADD2 is called the tag of the field. The label which appears beside a
- field on the screen is called its descriptor and you might have expected
- such labels to be used to refer to fields in search formulae. This is not
- done for two reasons:−
-
- (1) Descriptors can be inconveniently long for use in this way.
-
- (2) Fields don’t necessarily have descriptors. Of the 5 address fields
- only the first has a descriptor (Address). Since every data field
- needs a “handle” of some sort so that we can include it in search
- formulae we give each a tag, which is never more than 4 characters.
- Clicking MENU over a field makes its tag appear in the second menu
- item.
-
- The record for “Bloggs Fred” is, however, not the only one with an address
- in Exeter. There is another (“Sunningdale Samantha”) but with Exeter in
- ADDR3 rather than ADDR2. You can print both on the same list by using the
- formula:−
-
- ADD2,ADD3=Exeter
-
- Notice the way the alternative tags are separated by commas. We call this a
- tag list. A record will be printed if any one of the tags in the tag list is
- matched. The part of the search formula after the = sign is called the
- target and here too we may specify several in a target list. Try the
- following:−
-
- ADD3=Exeter,Anytown
-
- and also:−
-
- ADD2,ADD3=Exeter,Anytown
-
- The first of these examples prints the records for “Soap Joe” and
- “Sunningdale Samantha”, the second prints these two and “Bloggs Fred” as
- well. What the second formula is saying is “Print all the records which have
- either ‘Exeter’ or ‘Anytown’ in either the ADD2 or ADD3 field”.
-
- The characters we want to match don’t, of course, always make up the entire
- field. You can also search for part of a field. Suppose you wanted the
- records for people called Peter, Fred and Jean. Enter the formula:−
-
- NAME{Peter,Fred,Jean
-
- and you will find that the records for “Badgery Peter”, “Bloggs Fred” and
- “Ford Jean” are printed. The curly bracket (“{”) means “contains”. i.e. the
- name field doesn’t have to consist of Peter, or Fred or Jean, but has to
- contain one of these names somewhere within it.
-
- 4.3 Hard copy
- -------------
- So far you have displayed reports in a window. If you want to send them to
- your printer run !Printers, switch on the printer, then click MENU over the
- displayed report. The Save as text option leads to a standard Save box from
- which you can drag the file icon to !Printers on the icon-bar. You could
- also drag it to a directory window to save it. Or you could simply type
- Return, in which case the report would be saved under a suitable default
- name in a directory called PrintJobs inside the Friends database directory.
- Every Powerbase database has a PrintJobs directory to use as a general
- dumping ground for reports and which needs to be cleared out periodically.
-
- 5 Closing down
- ===============
- A database may be closed down by choosing the Close database entry from the
- icon-bar menu. When you do so all relevant data stored in memory is saved to
- disc and the database is closed. You do not have to do anything to save the
- database file itself to disc since it has been there all along. Only the
- current record is in memory at any one time and this is automatically
- written back to disc when it has been changed in any way.
-
- If you are going to use another database straight away just double click on
- it or drag it to the Powerbase icon on the icon bar. In fact you don’t even
- need to close the previous database before doing this; Powerbase will do it
- for you.
-
- When working with a database on the RAM disc Powerbase will issue a warning
- that the data is not secure and that you need to drag it from the RAM disc
- to a floppy or hard disc before switching off.
-
- To terminate Powerbase itself use the Quit option on the icon bar menu.
-
- =============
- MAIN TUTORIAL
- =============
- This section is intended to acquaint a new user with the most commonly-used
- facilities of Powerbase. It does not explain how to create a database from
- scratch but it does explain how to:−
-
- (a) Start up Powerbase and open an existing database.
- (b) Browse through the database and search for individual records.
- (d) Add new records and alter or delete existing ones.
- (d) Query the database to create simple reports.
- (e) Close the database.
-
- The sample database Elements is used to illustrate these activities. If you
- have a hard disc copy Elements and Powerbase itself onto it before
- proceeding further. It is possible to use Powerbase with floppy discs but
- some operations, such as printing lists, will be slow. Unless memory is very
- tight users of floppy discs are recommended to allocate at least 112K to the
- RAM disc and copy Elements onto it, which will make it much faster.
- Powerbase can provide context-sensitive help via Acorn’s !Help application
- and you are advised to load this, resizing the help window and placing it at
- the top right of the screen. Further help can be had by choosing the Help
- entry on Powerbase’s main menu or on the icon-bar menu.
-
- 1 Starting Powerbase
- =====================
- Double-click on the Powerbase icon. After a few seconds it will appear on
- the icon-bar with the words “No data” beneath it to show that no database is
- open. Dragging the ‘Elements’ icon onto the Powerbase icon on the icon-bar
- will open Elements for use and the words “No data” will be replaced by the
- name of the database. Double-clicking on the Elements icon has the same
- effect, in fact if Powerbase isn’t already on the icon-bar a double-click on
- Elements will install it for you provided that the Powerbase icon has been
- seen by the filer.
-
- Two windows will open. One is the record window and displays the first
- record in the database. The other is the keypad which allows you to control
- the browsing, searching and editing functions of Powerbase. The keypad is
- rather large and obscures quite a big area of the record window. The
- most-used buttons, however, are on the top two rows and the keypad can be
- moved part way off screen to get it out of the way.
-
- 2 Browsing and searching
- =========================
- Now that you have a database running we will find out how to move from
- record to record and how to access any particular record by using a small
- group of letters called the key of the record. All the mouse clicks
- referred to are made with the SELECT (left) button. If the chosen keypad
- action has an obvious opposite then you will find that using the ADJUST
- (right) mouse button brings about that effect. e.g. While SELECT on the top
- left keypad button takes you to the start of the file, ADJUST on the same
- keypad button takes you to the end.
-
- 2.1 Browsing through the records
- --------------------------------
- The top row of buttons on the keypad allows you to browse through the file.
- If you have !Help running, as previously suggested, it will tell you what
- each button does. Once you get the general idea you will find the symbols on
- the buttons logical and self-explanatory. The most commonly used ones act as
- follows:−
-
- (1) The buttons at the far left and right take you to the beginning and
- end of the file. The rightmost button takes you to ZIRCONIUM and the
- leftmost one to ACTINIUM.
-
- (2) Single arrows move by one record at a time. From ACTINIUM, clicking
- the right arrow takes you to ALUMINIUM. The left arrow takes you
- back to ACTINIUM.
-
- (3) Double arrows move through the file by longer jumps The right double
- arrow takes you from ACTINIUM to BISMUTH and the left one back to
- ACTINIUM. The “fast forward/rewind” value is shown in the box
- between these “fast wind” buttons. It is initially set to 10 but can
- be altered by clicking in it with SELECT and entering a new value.
-
- At either end of the file “wrap around” occurs. If you are at the last
- record (ZIRCONIUM) one record forward takes you to ACTINIUM again.
- Similarly, one record back from ACTINIUM goes to ZIRCONIUM.
-
- The second row has buttons marked like the “play” and “stop” controls of a
- cassette player. Play allows an automatic flip-through of the records
- without the need to touch any other buttons. When you get to the place you
- want, click on Stop. If the records go past too quickly you can slow the
- process down by increasing the number in the central icon of the top row of
- buttons. (This is normally used to set the “fast-wind” interval; see above.)
-
- 2.2 Key fields, Keys and Indices
- --------------------------------
- When using the six buttons on the top row of the keypad you will have
- noticed that the records appear to be arranged alphabetically by the name of
- the element. The actual order in which records occur in the file is in fact
- nothing like alphabetical, but the order in which they are accessed is
- determined by an index which forces them to appear in alphabetical order.
- Every database must have at least one index, but you can have as many extra
- ones as you wish (subject to memory and disc limitations).
-
- The second row of the keypad has two buttons featuring a blue arrow with a
- key symbol. Click on the right one and the record for HYDROGEN is displayed!
- If you now experiment with the top row of buttons as before you will find
- that the records no longer appear in alphabetical order of name but in order
- of ATOMIC NUMBER instead. What we have done is change to a different index.
- If a database has several indices the “key” buttons allow you to cycle
- through them in opposite directions. (Since Elements has only two indices
- the two buttons have exactly the same effect.) When you change to a
- different index the screen always displays the first record as determined by
- that index.
-
- An index is built from keys which are derived from a particular key field.
- The two indices used by Elements are based on the NAME and ATOMIC NUMBER
- fields. The way in which the key stored in the index is derived from the key
- field differs in the two cases. For the NAME index the first four letters of
- the name are used. Since no two elements have names beginning with the same
- four letters this gives a unique value for the key. (Two letters would not
- be enough because of names like CHLORINE and CHROMIUM.) The ATOMIC NUMBER
- index is based on the whole 3-digit maximum length and the ordering is
- numeric. Whenever a record is displayed the key is shown in the window title
- (# characters are for padding and should be ignored.)
-
- The record screen shows which fields are key fields and which are not. The
- labels, or descriptors, of fields are normally black. Where the fields are
- key fields they are shown in dark blue instead and the field used by the
- current index has its descriptor in red. Note also that the background
- colour of the NAME field is pale yellow whereas the rest are white . This
- indicates that NAME is the primary key field. The primary key is more
- important than the others. The index based on it is the only one which a
- database must have and is the one selected when a database is first opened.
-
- 2.3 Searching for a record
- --------------------------
- The fifth button on the second row of the keypad shows a question mark
- followed by a “record card” icon We will call it the Search button. When
- clicked with SELECT a small window, the Search window, opens to the right of
- the keypad. It contains a writable icon in which to enter the key of the
- record you wish to display. Suppose you want to see the record for the
- element NITROGEN. If the current index is the NAME then enter NITR and
- either type the Return key on the keyboard or click the Find button with
- SELECT. The required record quickly appears. If you enter the key of a
- non-existent record Powerbase displays the record which most nearly matches
- the key, but flashes the key field to warn you that what is being displayed
- is not what you asked for. You don’t necessarily need to type the whole key;
- NIT would do in this case, but NI would be ambiguous (there are elements
- called NICKEL and NIOBIUM).
-
- To find NITROGEN when the ATOMIC NUMBER index is active you would need to
- know that the atomic number of nitrogen is 7. Change key, enter this number
- and type Return or click on Find. The required record appears. Abbreviated
- keys are not allowed in this case for obvious reasons; if you want element
- 103 (LAWRENCIUM) it’s no good entering 10 (NEON)!
-
- You might want to examine a group of related records, e.g. the six similar
- elements LITHIUM, SODIUM, POTASSIUM, RUBIDIUM, CAESIUM and FRANCIUM which
- are known as the Alkali Metals. You could, of course, look up each in turn
- by entering its key but there is a better way. Click on the Use filter
- button on the keypad. The button becomes ticked and the Filter window opens
- on the right of the keypad. This button is what we call an option switch and
- is used to turn a particular feature ON or OFF. The six elements referred to
- all occur in group 1 of the Periodic Table of the elements so type GP=1 into
- the writable icon. and click on Filter. The record for CAESIUM is
- displayed. If you experiment with the buttons on the top row of the keypad
- you will find that they behave as if the six Alkali Metals were the only
- elements in the database; all the rest have been “filtered out” so that you
- access only the ones you are interested in. To return to normal operation
- either click the Cancel button on the Filter window or turn off the switch
- on the keypad.
-
- 3 Editing the Database
- =======================
- This part of the tutorial involves changes to the data records. Make a
- working copy of the disc and put the original in a safe place. If you are
- using a copy of Elements on the RAM disc the floppy disc won’t be altered,
- but it’s not a good idea to work with the original disc.
-
- 3.1 Modifying records
- ---------------------
- Pointing the mouse at any field and clicking SELECT places the caret in that
- field. The contents of the field may then be edited in the standard way for
- RISC OS writable icons. i.e.
-
- Ctrl U clears the field.
- Delete removes the character to the left of the caret.
- Copy removes the character to the right of the caret.
- Shift Copy deletes the word to the right of the caret.
- Ctrl Copy deletes everything from the caret to the end of the line.
- ⇦ and ⇨ move the caret left/right by one character.
- Shift ⇦ and Shift ⇨ move the caret left/right by one word.
- Ctrl ⇦ and Ctrl ⇨ move the caret to start and end of the field.
-
- Changes made to a record cause the record to be written back to the database
- whenever you display a different record or close the database. There is a
- button on the keypad called Force update but you don’t normally need to use
- it.
-
- 3.2 Using the scratchpad
- ------------------------
- It is sometimes necessary to copy the contents of one field into another,
- either in the same record or a different record. This can be done with the
- aid of the scratchpad which is controlled by the two buttons at the ends of
- the third row on the keypad. Place the caret in the field you want to copy
- and click on the left button. This stores the contents of the field on the
- scratchpad. Moving the caret to another field and clicking the right button
- copies the data from the scratchpad into that field, over-writing its
- previous contents. You may continue to “paste” the data into new fields as
- often as you like. Only when you click the left button again are the
- contents of the scratchpad changed. Data pasted into a field will not be
- allowed to overflow; if too long for the field it will be cut to the
- permitted length. As an added precaution you can’t paste into a field if
- there is nothing on the scratchpad so accidental blanking of fields is
- avoided.
-
- 3.3 Undoing mistakes
- --------------------
- You might edit the wrong field by mistake and want to restore the previous
- contents. Click MENU over the field. The second entry on the main menu
- contains the tag of the field. Follow the right-pointing arrow to the Field
- sub-menu and choose Undo changes. The previous contents of the field will be
- restored. Similarly, if you make a mess of a whole record and want to go
- back to the way it was you can choose Undo changes from the main menu.
-
- It is important to realise that the Undo facilities will not work if you
- have looked at another record before using them (or clicked on Force
- update). You can only recover data which has been altered in or removed from
- the currently-displayed record.
-
- 3.4 Adding new records
- ----------------------
- First we will add a new record for a fictitious element as described below:−
-
- NAME TASMANIUM
- SYMBOL Ts
- ATOMIC NUMBER 108
-
- The second button on the second row of the keypad has a plus sign and a
- “record card” icon. This is the Insert button. A blank record will be
- displayed with the caret in the NAME field. Enter TASMANIUM here and type
- Return. The caret will jump to the SYMBOL field. Enter Ts. You will now need
- to press Return twice to get to ATOMIC NUMBER (One press takes you to the
- un-named field after NAME where the origin of the element’s name is given.)
- Alternatively you could point the mouse at the ATOMIC NUMBER field and click
- SELECT. There is no need to press Return after entering a field in order to
- accept the data; it’s just the most convenient way of getting to the next
- field. When entering data into widely-scattered fields it is more
- convenient to use the mouse to move the caret.
-
- Having entered the data click any of the first row of buttons so a different
- record is shown. Now use Search to find TASMANIUM by name (its key will be
- TASM). Change to the other index and find it by atomic number. In both cases
- try moving to the record just before and just after the new one, noting that
- it has been placed in its correct position in both indices: between TANTALUM
- and TECHNETIUM in the NAME index and at the end of the ATOMIC NUMBER index.
-
- 3.5 Data Input Validation
- -------------------------
- When entering the above data you may have noticed that the NAME field will
- only accept capital letters and the ATOMIC NUMBER field will only accept
- numerals. Any others are simply ignored. We call this feature character
- validation.
-
- Another level of data validation, which we will now illustrate, is called
- table validation Make an entry in the GROUP field. Type X, for example,
- then try to move to another field by either typing Return or clicking the
- mouse. You will find that you can’t do so; you get an error message instead.
- This is because the GROUP field is linked to a validation table which means
- that only entries which appear in the table may be used in that field.
- Fields linked to validation tables are distinguished by using dark green,
- instead of black, as the foreground colour.
-
- To see what the validation table contains, place the caret in the GROUP
- field then click on the List values button on the keypad. The validation
- table will be displayed in its own window. Only items in the left column of
- the table may be entered in the GROUP field. Element 108 would be a
- transition metal, so enter T. You will now find that Powerbase accepts your
- data.
-
- Both character validation and table validation may be turned off and on by
- means of a switch on the Preferences window. To get at this window click
- MENU over the Powerbase icon on the icon-bar and choose Preferences from
- the icon-bar menu. The rather large window which appears has a collection of
- option switches down its left-hand side. The sixth of these (Validate input)
- is normally ON to indicate that validation is in effect. Click to turn it
- off then click on Accept. The Preferences window will be removed from the
- screen and you will find that input is no longer being validated.
-
- 3.6 Deleting records
- --------------------
- Since “tasmanium” isn’t a real element we want to remove it from our
- database. There is a “dustbin” button which will do exactly that but we
- won’t use it just yet. Make sure that the unwanted record is on the screen
- and click the button to the right of the bin. You will now find that
- TASMANIUM has vanished; the names run from TANTALUM to TECHNETIUM and the
- atomic numbers end with 103, just as they did before you added the extra
- record.
-
- What if you had clicked the button by mistake and deleted an important
- record? Powerbase handles this very nicely. The record hasn’t really been
- deleted at all. To prove this, click on the button above the one you used
- for “deleting”. This shows a green right-pointing arrow and a “card index”
- icon. TASMANIUM will reappear. You will also find that it appears to be the
- only record in the file! Don’t worry; nothing has been lost. A Powerbase
- database is treated as six separate subfiles numbered 0-5. When you first
- open the database you are looking at Subfile 0 and the heading of the record
- window shows this. If you look at the heading now you will see that it has
- changed to Subfile 1. The button you hav just clicked advances the subfile
- number by 1. Its counterpart on the left has the opposite effect.
-
- The buttons on either side of the bin carry pictures which suggest their
- true functions. They do not delete records; they merely move records from
- one subfile to another. The right button moves the displayed record to the
- next subfile in sequence. Thus, in the above case TASMANIUM has been moved
- from subfile 0 to subfile 1. A record in subfile 1 would be moved to subfile
- 2 and so on. When it gets to 5 the next click moves it into subfile 0 where
- it was originally. As you may have guessed, the left button moves records in
- the opposite direction, i.e. from subfile 1 to 0 or from subfile 0 to 5.
-
- If you do want to lose a record for good you consign it to the dustbin. As
- this button’s action is more drastic than that of the other two you are
- asked to confirm that this really is what you want to do before the deletion
- goes ahead.
-
- 4 Printing Lists
- =================
- Before Powerbase can produce a list it must be told:−
-
- • which fields should appear on the list
- • which records should appear on the list.
-
- 4.1 Making the field selection
- ------------------------------
- Specifying the fields you want is extremely easy. To include a field point
- the mouse at it and click with ADJUST. The selected field will appear with
- its foreground and background colours reversed. If you change your mind
- about a field you can de-select it by clicking on it again with ADJUST. The
- order in which the fields will appear in the printed list is the order in
- which you select them. Take care since there is nothing on the screen to
- indicate what order the fields will be in. The fields chosen for inclusion
- in a printout make up a selection which may be saved, using Save selection
- from the Print submenu, and reloaded for future use. Just for now select
- NAME, SYMBOL and GROUP.
-
- 4.3 Choosing which records to print
- -----------------------------------
- Specifying which records to print is more complicated, although efforts have
- been made to render it as simple as possible. With the pointer in the record
- window click MENU. This displays the main Powerbase menu from which you
- should choose Print. A small window appears in which you specify the
- criteria which must be met by records for inclusion in the list. If you just
- click the Print button (or type Return) without entering anything here you
- will obtain a list of the whole database (or, more accurately, the the whole
- of the current subfile). Try this first.
-
- Nothing will be printed until the search is complete. If the mouse pointer
- is over the main window the hourglass will tell you how far things have
- progressed. Pressing Escape will cause the process to be aborted. When
- complete the list will be displayed in a window. Clicking MENU over it
- displays a menu which leads to a Save box. You may save the list as a text
- file by dragging the file icon to a filer window or print it by loading
- !Printers and dropping the file icon on the !Printers icon on the icon-bar.
-
- If you point to a record in the displayed list and double-click with SELECT
- Powerbase will display the chosen record in the main record window. Moreover
- the caret is placed in the field you were pointing to on the list. This is
- very useful if you spot errors in the data whilst examining a list. A double
- click on the offending item offers the record with the caret correctly
- positioned for editing.
-
- Most database queries don’t, of course, involve printing all the records.
- You will usually need to enter a search formula before clicking Print. You
- have already used a search formula when you typed GP=1 to “filter out” all
- but the six Alkali Metal records (see 2.3). Search formulae can be complex
- and a more detailed treatment is given in the Manual. Only a few simple
- examples are shown here.
-
- Suppose we want a list of all transitional elements. i.e. all those which
- have T in the GROUP field. We can do this by entering the search formula:−
-
- GP=T
-
- Why GP? GROUP=T seems the more obvious choice but Elements contains many
- fields which have no label, such as the one on the first line which gives
- the origin of the element’s name. Every field which can hold data has to
- have a handle by which we can refer to it and that handle is called the
- field tag. Tags are very short; never more than four characters. You have
- seen some tags already. Look at the list you printed earlier. The three
- columns are headed with the tags (NAME, SYM and GP) not the descriptors
- (NAME, SYMBOL and GROUP). We therefore meets tags in two contexts:−
-
- • specifying fields in search formulae
- • as the default column headings in lists
-
- The Print options window, displayed by choosing Options from the Print
- submenu, lets you change the column headings to field descriptors if you
- prefer them.
-
- Type GP=T in the space provided and click Print. This time the list will be
- a much shorter one and you will see that the GP column contains T in every
- case.
-
- The second example involves printing all elements whose names end in “IUM”.
- What we need to specify is that NAME contains IUM and we do this by entering
- the search formula:−
-
- NAME{IUM.
-
- Note the use of a left brace (curly bracket) to mean “contains”. Another
- way to perform this search is to use a wild-card. Type:−
-
- NAME=$IUM
-
- Clicking Print will produce the same list as before. The “$” is a wild-card
- character which can represent any number of unspecified characters. The
- search formula is saying in effect, “I don’t care what the first part of the
- name is as long as it ends with IUM”.
-
- We will combine the previous two examples into a two-pronged search for all
- the TRANSITIONAL elements whose names end in “IUM”. The search formula this
- time is either:−
-
- NAME{IUM AND GP=T
-
- or:−
-
- NAME=$IUM AND GP=T
-
- Note the spaces before and after AND. These are essential. You might like to
- try an alternative way of entering a search formula. Proceed as follows:−
-
- 1. Click the Help button on Print window. This opens the Help window.
-
- 2. NAME should already be visible as the required field, but you need
- to select the radio button for contains.
-
- 3. Click in the space next to Value and enter IUM.
-
- 4. Click Add to formula. The search formula now reads NAME{IUM.
-
- 5. Click the AND button.
-
- 6. Click on the “menu” button to the right of the tag display and
- choose item 6 (GP)
-
- 7. Select the radio button for is equal to
-
- 8. Enter T in the Value field.
-
- 9. Click Add to formula
-
- The complete search formula should now be visible so click Print and the
- list will be produced. The procedure takes far longer to describe than to do
- and can be a great help to the infrequent Powerbase user who has trouble
- remembering the syntax of search formulae. If you use complex queries often
- you may find it convenient to save them for future use. Save query from the
- Print submenu enables you to do this.
-
- The biggest problem you are likely to encounter is not knowing the tags for
- the various fields. By using the above method you can see all the tags
- displayed in a menu or cycle through them using a pair of arrowheads called
- “bump” icons. It is also useful to know that clicking with SELECT on a field
- while holding down Ctrl causes the tag of that field to appear in the search
- formula icon.
-
- 5 Merging data into an Impression document
- ===========================================
- The distribution disc contains a simple Impression document called
- MergeTest. It will be used in conjunction with the Elements database to
- illustrate direct data-merging with Impression.
-
- (1) Ensure that Impression has been “seen” by the filer. (You need not
- actually load it.)
-
- (2) Open the Elements database and drop MergeTest onto the record
- window. The Data merge window will appear.
-
- (3) Click on Merge. You will see that data relating to the record for
- ACTINIUM has been inserted into the Impression document.
-
- (4) The arrow and double-arrow buttons, identical to those on the
- keypad, may be used to move through the database merging different
- records into the document.
-
- (5) A search formula may be used to restrict the operation to records
- matching certain criteria.
-
- (6) Print may be used to print the document with the currently-merged
- data. To print a set of documents, one for each matching element,
- select Print all then click on Merge.
-
- During data-merging Impression editing is disabled; you can’t place the
- caret in the document and the mouse pointer appears as a red and blue cross.
- Clicking on Cancel or closing the Data merge window restores normal editing.
-
- For more information on data-merging, including instructions on how to
- prepare the Impression document, see Ch 9 in the Manual.
-
- 6 Closing down
- ===============
- A database may be closed down by choosing the Close database entry from the
- icon bar menu. When you do so, all the indices stored in memory are saved to
- disc and the database is closed. You do not have to do anything to save the
- database itself to disc since it has been there all along. Only the current
- record is in memory at any one time and this is automatically written back
- to disc when it has been changed in any way.
-
- Also saved automatically is the link file which holds the relational links
- between the main database and the validation tables. The tables themselves
- are also saved.
-
- There’s also an Abandon database entry on the icon-bar menu. This too will
- close your database but without saving new data to the disc. It is really
- intended as the quickest way to close a database which you have opened
- simply for examination. If you are entering data for real you should use
- Close database.
-
- If you are going to use another database straight away just double click on
- it or drag it to the Powerbase icon on the icon bar. In fact you don’t even
- need to close the previous database before doing this; Powerbase will do it
- for you.
-
- When working with a database on the RAM disc Powerbase will issue a warning
- that the data is not secure and that you need to drag it from the RAM disc
- to a floppy or hard disc before switching off.
-
- To terminate Powerbase itself use the Quit option on the icon bar menu.